﻿Imports System.Windows.Forms
Public Class MDIParent1

    Private Sub MDIParent1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        FormUser.MdiParent = Me
        FormUser.WindowState = FormWindowState.Normal
        FormUser.Show()
        ToolStripStatusLabel1.Text = "UserName :"
        ToolStripStatusLabel3.Text = "Date :"
        DateStatusLabel.Text = Format(Now, "dd/MMM/yyy")
        ToolStripStatusLabel5.Text = "Time :"
        StatusStrip.Enabled = True
    End Sub

    Private Sub WorkToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WorkToolStripMenuItem.Click
        FormWork.MdiParent = Me
        FormWork.WindowState = FormWindowState.Maximized
        FormWork.Show()
        FormCheckMorning.ShowDialog()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        TimeStatusLabel.Text = Now.ToLongTimeString.ToString()
    End Sub

    Private Sub EmployeeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeToolStripMenuItem.Click
        FormEmployee.MdiParent = Me
        FormEmployee.WindowState = FormWindowState.Maximized
        FormEmployee.Show()
    End Sub

    Private Sub SalaryToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SalaryToolStripMenuItem.Click
        FormSalary.MdiParent = Me
        FormSalary.WindowState = FormWindowState.Maximized
        FormSalary.Show()
    End Sub

    Private Sub WorkOTToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WorkOTToolStripMenuItem.Click
        FormWork.MdiParent = Me
        FormWork.WindowState = FormWindowState.Maximized
        FormWork.Show()
        FormCheckOverTime.ShowDialog()
    End Sub

    Private Sub HistoryEmployeeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HistoryEmployeeToolStripMenuItem.Click
        FormHistoryEmployee.MdiParent = Me
        FormHistoryEmployee.WindowState = FormWindowState.Maximized
        FormHistoryEmployee.Show()
    End Sub

    Private Sub EmployeeToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeToolStripMenuItem1.Click
        FormReportEmployee.MdiParent = Me
        FormReportEmployee.WindowState = FormWindowState.Maximized
        FormReportEmployee.Show()
    End Sub
End Class
